package com.appsky.drift.api;

import com.alibaba.fastjson.JSONObject;

public class ChatMessage {
	
	private int id = 0;
	
	private String content = null;
	
	private String nick = null;
	
	private int sex = 2;
	
	//是不是自己发的
	private boolean isMe = true;

	public ChatMessage(JSONObject json, boolean isMe) {
		id = json.getIntValue("id");
		content = json.getString("content");
		nick = json.getString("nick");
		sex = json.getIntValue("sex");
		this.isMe = isMe;
	}
	
	/**
	 * 判断是否为自己发的消息
	 * @return
	 */
	public boolean isMe() {
		return isMe;
	}

	public int getId() {
		return id;
	}

	public String getContent() {
		DLog.i("content: " + content);
		return content;
	}

	public String getNick() {
		return nick;
	}

	public int getSex() {
		return sex;
	}
}
